package com.cn.xarm.client.service.impl;

import com.cn.xarm.client.dao.StudentDao;
import com.cn.xarm.client.domain.Score;
import com.cn.xarm.client.domain.Student;
import com.cn.xarm.client.service.ScoreModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ScoreModelServiceImpl implements ScoreModelService {
    @Autowired
    private StudentDao studentDao;

    @Override
    public List<Student> queryStudentAndScore(String num) {
        return null;
    }

    @Override
    public Student get(String num) {
        Student student = studentDao.get(num);
        List<Score> scores = studentDao.queryScore(num);
       // List<Score> scoreens = studentDao.queryScoreen(num);
        student.setScores(scores);
      //  student.setScores(scoreens);
        return student;
    }
}
